<script setup>
import { useCounterStore } from '../stores/counter'
// useCounterStore返回的是一个方法，我们调用下可以得到实例
// 里面的东西就是return的内容`return { count, doubleCount, increment }`
const counterStore = useCounterStore();
</script>

<template>
    <div>
        count值：{{ counterStore.count }}、count*2值：{{ counterStore.doubleCount }}
        <button @click="counterStore.increment">Count++</button>
    </div>
</template>